import Http from '@/lib/http'

export function page (data) {
  return Http.get(
    '/goods/report/page',
    data,
  )
}

export function recordList (goodReportId) {
  return Http.get(
    `/goods/report/record/list?goodReportId=${goodReportId}`,
  )
}

export function updateState (reportGoodId, filingState) {
  return Http.post(
    '/goods/report/updateState',
    {
      reportGoodId,
      filingState,
    },
  )
}

export function add (list) {
  return Http.post('/goods/report/add', list)
}

export function update (data) {
  return Http.post('/goods/report/update', {
    ...data,
  })
}

export function detail (reportGoodId) {
  return Http.get(`/goods/report/detail?reportGoodId=${reportGoodId}`)
}
